import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/index/index.vue'
import tarbar from '../components/tarbar.vue'

const routes = [
  {
    path: '/index',
    name: 'index',
    components: {
      default:HomeView,
      footer:tarbar,
  },
},
{
  path: '/kind',
  name: 'kind',
  components: {
    default:() => import('../views/kind/index.vue'),
    footer:tarbar,
},
},
{
  path: '/shop',
  name: 'shop',
  components: {
    default:() => import('../views/shop/index.vue'),
    footer:tarbar,
},
},
{
  path: '/user',
  name: 'user',
  components: {
    default:() => import('../views/user/index.vue'),
    footer:tarbar,
}
},
  // {
  //   path: '/about',
  //   name: 'about',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  // }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
